package com.cskaoyan.converter;

import com.cskaoyan.bean.User;
import org.springframework.core.convert.converter.Converter;

/**
 * @author stone
 * @date 2022/06/23 10:02
 */
public class String2UserConverter implements Converter<String, User> {
    @Override
    public User convert(String s) {
        // 里面的转换业务需要你自己定义
        User user = new User();
        user.setUsername(s);
        user.setPassword(s);
        return user;
    }
}
